/*上传图片*/
$('.upload-file').change(function(){
    var that = this;
    lrz(that.files[0], {
        width: 133
    })
        .then(function (rst) {
            $.post(
                web_url+'/member/default/upload.html',
                {'content':rst.base64},
                function (res) {
                    $('.avatar').attr('src',res.data.real_name);
                    $('.register-avatar').val(res.data.real_name);
                },'json'
            );
            return rst;
        });
});

$('#info-sub').on('click', function () {
    var name = $('#name').val();
    var sex = $('.sex:checked').val();
    var avatar = $('.register-avatar').val();

    $.post(
        web_url+'/member/default/infoopt.html',
        {'name':name, 'sex':sex, 'avatar':avatar},
        function (res) {
            layer.alert(res.msg);
            location.reload();
        },'json'
    );
});